﻿@model WebUI.Models.aspnet_Users
@using (Ajax.BeginForm(new AjaxOptions()
{
    LoadingElementId="OnLoadingSpan",UpdateTargetId = "DoctorListView",
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "Post",
    OnSuccess = "$('#dialogbox').dialog('close');",
    OnFailure = "OnSiteError"
}))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>医生信息</legend>
        @Html.HiddenFor(model => model.UserId)
        @Html.HiddenFor(model => model.UserName)
        <table width="100%">
            <tr>
                <td>
                    <div class="editor-label">
                        用户名
                    </div>
                    <div class="editor-field">
                    @Html.TextBoxFor(model => model.UserName, new { disabled = true, @readonly = "readonly" })
                    </div>
                    <div class="editor-label">
                        密码
                    </div>
                    <div class="editor-field">
                        @Html.Password("Pwd")
                    </div>
                    <div class="editor-label">
                        确认密码
                    </div>
                   <div class="editor-field">
                        @Html.Password("Pwd2")
                    </div>
                    <div class="editor-label">
                        手机号码
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.MobileAlias)
                        @*@Html.EditorFor(model => model.MobileAlias, "TxtField")*@
                        @Html.ValidationMessageFor(model=>model.MobileAlias)
                    </div>
                     <div class="editor-label">
                           是否是主任医生:
                    </div>
                    <div class="editor-field">
                        @* @Html.CheckBox("IsDeptManager", SiteUser.IsDoctorDepManager,new { disabled = true, @readonly = "readonly" })@Html.LabelFor(model => model.IsDoctorDepManager)*@
                        @(Model.IsDoctorDepManager?"主任医生":"医生")
                    </div>
                </td>
                <td>
                    <div class="editor-label">
                            所属医院
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.Hospital.HospName, new { disabled = true, @readonly = "readonly" })
                    </div>
                    <div class="editor-label">
                            所属科室
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.BingQu.Title, new { disabled = true, @readonly = "readonly" })
                    </div>
                    <div class="editor-label">
                            所属病区
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.Department.DepName, new { disabled = true, @readonly = "readonly" })
                    </div>
                    <div class="editor-label">
                            性别
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.Gender, new { disabled = true, @readonly = "readonly" })
                    </div>
                    <div class="editor-label">
                        电子邮箱
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.Email)
                    </div>
                </td>
            </tr>
        </table>
        <p>
            <input type="submit" value="确定" />
        </p>
    </fieldset>
}